<?php

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';

use Doraemon\model\Spu as mSpu;

$wikiid = 0;
$wikiInfo = mSpu::get("*", [
	'id[>]' => $wikiid,
	'status' => [
		mSpu::STATUS_NORMAL,
		mSpu::STATUS_REVIEW,
	]
]);
while ($wikiInfo) {
	\Biz\service\ShopGoodsOperator::cliFavoriteByWikiId($wikiInfo['id']);
	\Biz\service\ShopGoodsOperator::cliRelaPhotosByWikiId($wikiInfo['id']);

	echo $wikiInfo['id'] . "\r\n";
	$wikiid = $wikiInfo['id'];
	$wikiInfo = mSpu::get("*", [
		'id[>]' => $wikiid,
		'status' => [
			mSpu::STATUS_NORMAL,
			mSpu::STATUS_REVIEW,
		]
	]);

}

